package com.github.pig.stock.controller;

import com.github.pig.common.util.ZyResult;
import com.github.pig.stock.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("ali")
public class AliyunController {
    @Autowired
    private OssService ossService;

    @GetMapping("ossToken")
    public ZyResult getOssToken(String uploaddir){
            return ZyResult.ok(ossService.getStsToken(uploaddir));
    }

}
